import axios from '../utils/axios'
import qs from 'qs'

const request = {}
request.get = function (url, params) {
    return axios({
        method: 'get',
        url,
        data:params
    })
}
request.post = function (url, params) {
    return axios({
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        method: 'post',
        url,
        data: qs.stringify(params)
    })
}
request.postJson = function (url, params) {
    return axios({
        method: 'post',
        url,
        data:params
    })
}
export default request
